using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._CartographyTools._Generalization
{
    /// <summary>
    /// <para>Delineate Built-Up Areas</para>
    /// <para>Creates polygons to represent built-up areas by delineating densely clustered arrangements of buildings on small-scale maps.</para>
    /// <para>通过在小比例尺地图上描绘建筑物的密集聚类排列，创建多边形来表示建成区。</para>
    /// </summary>    
    [DisplayName("Delineate Built-Up Areas")]
    public class DelineateBuiltUpAreas : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public DelineateBuiltUpAreas()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_buildings">
        /// <para>Input Building Layers</para>
        /// <para>The layers containing buildings with density and arrangement that are used to define appropriate output built-up polygons. Multiple building layers can be assessed simultaneously. Building features can be points or polygons.</para>
        /// <para>包含具有密度和排列的建筑物的图层，用于定义适当的输出建筑面。可以同时评估多个建筑层。建筑要素可以是点或面。</para>
        /// </param>
        /// <param name="_grouping_distance">
        /// <para>Grouping Distance</para>
        /// <para>Buildings closer together than the grouping distance are considered collectively as candidates for representation by an output built-up area polygon. This distance is measured from the edges of polygon buildings and the centers of point buildings.</para>
        /// <para>比分组距离更近的建筑物被统称为输出建成区面表示的候选对象。此距离是从多边形建筑物的边缘和点建筑物的中心测量的。</para>
        /// </param>
        /// <param name="_minimum_detail_size">
        /// <para>Minimum Detail Size</para>
        /// <para>The relative degree of detail in the output built-up area polygons. This is approximately to the minimum allowable diameter of a hole or cavity in the built-up area polygon. The actual size and shape of holes and cavities within the polygon is determined also by the arrangement of the input buildings, the grouping distance, and the presence of edge features if they are used.</para>
        /// <para>输出建成区面中的相对细节程度。这大约是建筑面积多边形中孔或空腔的最小允许直径。面内孔和空腔的实际大小和形状还取决于输入建筑物的排列、分组距离以及边缘要素（如果使用）的存在。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The output feature class containing built-up area polygons representing clustered arrangements of input buildings.</para>
        /// <para>输出要素类包含表示输入建筑物聚类排列的建成区面。</para>
        /// </param>
        public DelineateBuiltUpAreas(List<object> _in_buildings, string? _grouping_distance, string? _minimum_detail_size, object _out_feature_class)
        {
            this._in_buildings = _in_buildings;
            this._grouping_distance = _grouping_distance;
            this._minimum_detail_size = _minimum_detail_size;
            this._out_feature_class = _out_feature_class;
        }
        public override string ToolboxName => "Cartography Tools";

        public override string ToolName => "Delineate Built-Up Areas";

        public override string CallName => "cartography.DelineateBuiltUpAreas";

        public override List<string> AcceptEnvironments => ["cartographicPartitions", "referenceScale"];

        public override object[] ParameterInfo => [_in_buildings, _identifier_field, _edge_features, _grouping_distance, _minimum_detail_size, _out_feature_class, _minimum_building_count];

        /// <summary>
        /// <para>Input Building Layers</para>
        /// <para>The layers containing buildings with density and arrangement that are used to define appropriate output built-up polygons. Multiple building layers can be assessed simultaneously. Building features can be points or polygons.</para>
        /// <para>包含具有密度和排列的建筑物的图层，用于定义适当的输出建筑面。可以同时评估多个建筑层。建筑要素可以是点或面。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Building Layers")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _in_buildings { get; set; }


        /// <summary>
        /// <para>Identifier Field</para>
        /// <para><xdoc>
        ///   <para>A field in the input feature classes that will hold a status code indicating whether the input feature is part of the resulting built-up area . This field must be either short or long integer type and common to all input layers if multiple input layers are used.
        ///   <bulletList>
        ///     <bullet_item>0—The building is not represented by an output built-up area polygon.  </bullet_item><para/>
        ///     <bullet_item>1—The building is represented by an output built-up area polygon and is within the resulting polygon.  </bullet_item><para/>
        ///     <bullet_item>2—The building is represented by an output built-up area polygon and is outside the resulting polygon.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>输入要素类中的一个字段，用于保存状态代码，指示输入要素是否为生成的建成区的一部分。如果使用多个输入图层，则此字段必须为短整数或长整数类型，并且对于所有输入图层都是通用的。
        ///   <bulletList>
        ///     <bullet_item>0 - 建筑物不由输出建成区面表示。</bullet_item><para/>
        ///     <bullet_item>1 - 建筑物由输出建成区面表示，并且位于生成的面内。</bullet_item><para/>
        ///     <bullet_item>2 - 建筑物由输出建成区面表示，并且位于生成面之外。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Identifier Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _identifier_field { get; set; } = null;


        /// <summary>
        /// <para>Edge Features</para>
        /// <para>The layers that will be used to define the edges of the built-up area polygons. Typically, these are roads, but other common examples are rivers, coastlines, and administrative areas. Built-up area polygons snap to an edge feature if one is generally aligned with the trend of the polygon edge and within the grouping distance away. Edge features can be lines or polygons.</para>
        /// <para>将用于定义建成区面边的图层。通常，这些是道路，但其他常见的示例是河流、海岸线和行政区域。如果建成区面通常与面边的趋势对齐且在分组距离内，则该面将与边要素对齐。边缘要素可以是直线或面。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Edge Features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _edge_features { get; set; } = null;


        /// <summary>
        /// <para>Grouping Distance</para>
        /// <para>Buildings closer together than the grouping distance are considered collectively as candidates for representation by an output built-up area polygon. This distance is measured from the edges of polygon buildings and the centers of point buildings.</para>
        /// <para>比分组距离更近的建筑物被统称为输出建成区面表示的候选对象。此距离是从多边形建筑物的边缘和点建筑物的中心测量的。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Grouping Distance")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public string? _grouping_distance { get; set; }


        /// <summary>
        /// <para>Minimum Detail Size</para>
        /// <para>The relative degree of detail in the output built-up area polygons. This is approximately to the minimum allowable diameter of a hole or cavity in the built-up area polygon. The actual size and shape of holes and cavities within the polygon is determined also by the arrangement of the input buildings, the grouping distance, and the presence of edge features if they are used.</para>
        /// <para>输出建成区面中的相对细节程度。这大约是建筑面积多边形中孔或空腔的最小允许直径。面内孔和空腔的实际大小和形状还取决于输入建筑物的排列、分组距离以及边缘要素（如果使用）的存在。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Minimum Detail Size")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public string? _minimum_detail_size { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output feature class containing built-up area polygons representing clustered arrangements of input buildings.</para>
        /// <para>输出要素类包含表示输入建筑物聚类排列的建成区面。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Minimum Building Count</para>
        /// <para>The minimum number of buildings that must be collectively considered for representation by an output built-up area polygon. The default value is 4. The minimum building count must be greater than or equal to 0.</para>
        /// <para>必须共同考虑的最小建筑物数，以便通过输出建成区面进行表示。默认值为 4。最小建筑物计数必须大于或等于 0。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Minimum Building Count")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long? _minimum_building_count { get; set; } = null;


        public DelineateBuiltUpAreas SetEnv(object cartographicPartitions = null, object referenceScale = null)
        {
            base.SetEnv(cartographicPartitions: cartographicPartitions, referenceScale: referenceScale);
            return this;
        }

    }

}